
def egg(T, N):
    # T层,N蛋
    dp = [[0] * (N+1) for _ in range(T+1)]
    for i in range(1, N+1):
        max_value = 0
        for j in range(i, T+1):
            breaked = dp[j, i-1]
            not_breakd =dp[T-j, i]
            max(breaked, not_breakd) + 1

    # def helper(t, n):
    #     if t == 1:
    #         return 1
    #     if n == 1:
    #         return t
    #     breaked = helper(t, n-1)
    #     not_breaked = helper(T-t, n)
    #     return breaked + not_breaked + 1
    
    # 从1到n计算
    # k = 1
    # while helper(k, N) < N:
    #     k += 1
    return helper(T, N)

print(egg(2, 2))